﻿using Xejen.Communication.Http.Configuration;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Text.Json;

namespace Xejen.Communication.Http.Abstract
{
    /// <inheritdoc cref="IHttpContentStrategy"/>
    internal abstract class ContentStrategyBase : IHttpContentStrategy
    {
        /// <inheritdoc cref="Xejen.Communication.Http.Configuration.HttpConfig" />
        protected HttpConfig HttpConfig { get; }

        /// <inheritdoc cref="ContentStrategyBase"/>
        /// <param name="config"><inheritdoc cref="HttpConfig" path="/summary"/></param>
        protected ContentStrategyBase(HttpConfig config)
        {
            HttpConfig = config;
        }

        /// <inheritdoc/>
        public abstract HttpContent CreateHttpContent(object data);
    }
}
